
<table class="table table-striped table-hover table-condensed table-bordered">
    <thead>
        <tr>
            <th class="text-center"><input type="checkbox" id="checkall"></th>
            <th class="text-center">#</th>
            <th class="text-center">日期</th>
            <th class="text-center">部门</th>
            <th class="text-center">光缆名称</th>
            <th class="text-center">光缆编码</th>
            <th class="text-center">芯数</th>
            <th class="text-center">长度</th>
            <th class="text-center">标牌数</th>
            <th class="text-center">领用人</th>
            <th class="text-center">经办人</th>
            <th class="text-center">来源</th>
            <th class="text-center">GIS</th>
            <th class="text-center">备注</th>
        </tr>
    </thead>
    <tbody>
    {% for card in cards %}
        <tr>
            <td class="text-center"><input type="checkbox" value="{{ card.card_id }}" name="checkid" class="checkid"></td>
            <td class="text-center">{{ loop.index+(page-1)*pc }}</td>
            <td class="text-center">{{ card.card_date }}</td>
            <td>{{ card.card_dept }}</td>
            <td><a href="{{ url_for('Card',card_id=card.card_id) }}">{{ card.card_fibername }}</a></td>
            <td>{{ card.card_fibercode }}</td>
            <td class="text-center">{{ card.card_fibercore }}</td>
            <td class="text-center">{{ card.card_fiberlen }}</td>
            <td class="text-center">{{ card.card_count }}</td>
            <td>{{ card.card_use }}</td>
            <td>{{ card.card_action }}</td>
            <td>{{ card.card_source }}</td>
            <td class="text-center">
                {% if card.card_gis %}
                    <span class="glyphicon glyphicon-ok"></span>
                {% else %}
                    <span class="glyphicon glyphicon-remove"></span>
                {% endif %}
            </td>
            <td>{{ card.card_memo }}</td>
        </tr>
    {% endfor %}
    </tbody>
	<tfoot>
		<tr>
			<td colspan="8">小计</td>
			<td class="text-center">{{ xj_card_count }}</td>
			<td colspan="5"></td>
		</tr>
		<tr>
			<th colspan="8">合计</th>
			<th class="text-center">{{ sum_card_count }}</th>
			<th colspan="5"></th>
		</tr>
	</tfoot>
</table>
<div>
    <span id="pagebar">
        <button id="useprint">打印领用单</button>
        <button id="useprint_word">打印领用单(word)</button>
        查询到 {{ rows }} 条记录
        {% if page|int >1 %}
            <a href="#" id="1">首页</a> <a href="#" id="{{ page|int-1 }}">上一页</a>
        {% endif %}
        {% if not (page|int>=pages or pages|int==0) %}
            <a href="#" id="{{ page|int+1 }}">下一页</a> <a href="#" id="{{ pages }}">尾页</a>
        {% endif %}
        第 {{ page }} 页 / 共 {{ pages }} 页
        转到 <input id="page_val" type="text" size="2" value="{{ page }}">
        <input id="page_go" type="button" value="Go">

    </span>
</div>
